package com.yneusoft.common.model;

import com.yneusoft.common.enums.ResultEnum;
import lombok.Data;

/**
 * @author: wang
 * @date: 2018/10/25 10:52
 * @description: 自定义异常类
 */
@Data
public class BusinessException extends RuntimeException   {
    /**
     * 错误码
     */
    private Integer code;

    public BusinessException(ResultEnum resultEnum) {
        super(resultEnum.getMessage());
        this.code = resultEnum.getCode();
    }
}